package com.andyliu.vo;

import com.andyliu.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * ClassName: ParamVO
 * Description: TODO
 * date: 2021/1/31 1:22 下午
 *
 * @author andyliu
 * @since JDK 1.8
 */
@ApiModel(description = "请求参数实体封装")
@Data
public class ParamVO<T> implements Serializable {
    private static final long serialVersionUID = -8381976565835752082L;
    @ApiModelProperty(value = "封装请求参数")
    private T param;
    @ApiModelProperty(value="当前页码")
    private Integer pageNumber=1;
    @ApiModelProperty(value="每页显示条数")
    private Integer pageSize= CommonConstant.DEFAULT_PAGE_SIZE;


    public ParamVO(T param) {
        this.param = param;
    }

    public ParamVO() {
    }

    public ParamVO(T param, Integer pageNumber, Integer pageSize) {
        this.param = param;
        this.pageNumber = pageNumber;
        this.pageSize = pageSize;
    }
}
